package ${buildCodeRequest.codePackageDTO.queryDTOPackage};

import java.util.*;
import lombok.Getter;
import lombok.Setter;
import org.web.base.domain.*;
<#if buildCodeRequest.jdkVersion != '1.8' && buildCodeRequest.jdkVersion != '8'>
import jakarta.validation.constraints.*;
<#else>
import javax.validation.constraints.*;
</#if>

@Setter
@Getter
public class ${buildCodeRequest.codeClassNameDTO.queryDTOClassName} extends ExtendQueryBase {
<#assign result = "">
<#list buildCodeRequest.attributeDTOList as attributeDTO>
    <#if result != "">
        <#assign result = result + ", ">
    </#if>
    <#assign result = result + "\"" + attributeDTO.columnAttribute.columnName + "\"">
</#list>
    /**
    * 圈定 'specifiedAttributeSet' 返回属性信息范围，指定的属性信息与列定义名称保持一致。
    */
    private static final Set<String> COLUMN_SET = new HashSet<>(Arrays.asList(${result}));

    /**
    * 圈定 'specifiedAttributeSet' 返回属性信息范围，指定的属性信息与列定义名称保持一致。
    */
    private static final Set<String> SORT_COLUMN_SET = new HashSet<>(Arrays.asList(${result}));

    @Override
    public Set<String> getColumnsSet() {
        return COLUMN_SET;
    }

    @Override
    public Set<String> getSortColumnsSet() {
        return SORT_COLUMN_SET;
    }

<#list buildCodeRequest.attributeDTOList as attributeDTO>
<#if attributeDTO.javaAttribute.supportEqual?has_content && "Y"== attributeDTO.javaAttribute.supportEqual>
    /**
    * 根据 '${attributeDTO.javaAttribute.attributeName}' 精确查询.
    */
    private ${attributeDTO.javaAttribute.attributeType} ${attributeDTO.javaAttribute.attributeName};

</#if>
<#if attributeDTO.javaAttribute.supportFuzzy?has_content && "Y"== attributeDTO.javaAttribute.supportFuzzy>
    /**
    * 根据 'fuzzy${attributeDTO.javaAttribute.initUpperAttributeName}' 模糊查询.
    */
    private ${attributeDTO.javaAttribute.attributeType} fuzzy${attributeDTO.javaAttribute.initUpperAttributeName};

</#if>
<#if attributeDTO.javaAttribute.supportIn?has_content && "Y"== attributeDTO.javaAttribute.supportIn>
    /**
    * 根据 '${attributeDTO.javaAttribute.attributeName}Set' 范围查询.
    */
    private Set<${attributeDTO.javaAttribute.attributeType}> ${attributeDTO.javaAttribute.attributeName}Set;

</#if>
<#if attributeDTO.javaAttribute.supportCompare?has_content && "Y"== attributeDTO.javaAttribute.supportCompare>
    /**
    * 设置大于 '${attributeDTO.javaAttribute.attributeName}' 查询.
    */
    private ${attributeDTO.javaAttribute.attributeType} moreThan${attributeDTO.javaAttribute.initUpperAttributeName};

    /**
    * 设置小于 '${attributeDTO.javaAttribute.attributeName}' 查询.
    */
    private ${attributeDTO.javaAttribute.attributeType} lessThan${attributeDTO.javaAttribute.initUpperAttributeName};

    /**
    * 设置大于等于 '${attributeDTO.javaAttribute.attributeName}' 查询.
    */
    private ${attributeDTO.javaAttribute.attributeType} equalAndMoreThan${attributeDTO.javaAttribute.initUpperAttributeName};

    /**
    * 设置小于等于 '${attributeDTO.javaAttribute.attributeName}' 查询.
    */
    private ${attributeDTO.javaAttribute.attributeType} equalAndLessThan${attributeDTO.javaAttribute.initUpperAttributeName};

</#if>
</#list>

    @NotNull(message = "pageSize 不能为空")
    @Max(value = 200, message = "pageSize 不能大于200")
    public Integer getPageSize() {
        return super.getPageSize();
    }
}